package ru.arriah.servicedesk.bean;

import java.sql.ResultSet;
import java.sql.SQLException;

import ru.arriah.common.bean.GenericBean;

public class RequestTypeBean extends GenericBean {

   private String type;

   public RequestTypeBean() {
      super();
   }
   
   public RequestTypeBean(ResultSet resultSet) {
      fillFromResultSet(resultSet);
   }

   public String getType() {
      return type;
   }

   public void setType(String type) {
      this.type = type;
   }

   public boolean isValid() {
      return true;
   }

   @Override
   public void fillFromResultSet(ResultSet resultSet) {
      try {
         setId(resultSet.getInt("requesttype.id"));
         setType(resultSet.getString("requesttype.request_type"));
      } catch (SQLException e) {
         // TODO Auto-generated catch block
         e.printStackTrace();
      }
   }
}
